#include "VertexBuffer.h"
#include "D3D9Renderer.h"

template<>
void VertexBuffer<VertexPNT>::CreateVertexDeclaration()
{
    D3DVERTEXELEMENT9 decl[] =
    {
        {0,0,D3DDECLTYPE_FLOAT3,D3DDECLMETHOD_DEFAULT,D3DDECLUSAGE_POSITION,0},
        {0,12,D3DDECLTYPE_FLOAT3,D3DDECLMETHOD_DEFAULT,D3DDECLUSAGE_NORMAL,0},
        {0,24,D3DDECLTYPE_FLOAT2,D3DDECLMETHOD_DEFAULT,D3DDECLUSAGE_TEXCOORD,0},
        D3DDECL_END()
    };
	D3D9Renderer::device->CreateVertexDeclaration(decl, &m_pVertexDecl);
}

void VertexBuffer<VertexPT>::CreateVertexDeclaration()
{
    D3DVERTEXELEMENT9 decl[] =
    {
		{0,0,D3DDECLTYPE_FLOAT3,D3DDECLMETHOD_DEFAULT,D3DDECLUSAGE_POSITION,0},
		{0,12,D3DDECLTYPE_FLOAT2,D3DDECLMETHOD_DEFAULT,D3DDECLUSAGE_TEXCOORD,0},
        D3DDECL_END()
    };
	D3D9Renderer::device->CreateVertexDeclaration(decl, &m_pVertexDecl);
}